package com.yeheng.inteceptor;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
import java.util.Date;

/**
 * @PackgeName: com.yeheng.inteceptor
 * @ClassName: MyListener
 * @Author: YH
 * Date: 2021/1/1 15:13
 * project name: homework1
 * @Version:
 * @Description:
 */
//@WebListener直接用注解配置就好
public class MyListener implements HttpSessionListener, ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("tomcat启动了");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }

    public MyListener() {
    }


}
